                 //unsigned char txt='a';
unsigned char rx1,rx2,rx3;
unsigned char rx1str[13],rx1strcat[1];
char txt[4];
//unsigned short data = 0, ro=0, *rec;
//char stop="Stop!!";
char data;
int error;


void uart_str(char *s)
{
   while(*s){uart1_write_char(*s++);}
}
void main() {

  ADPCFG = 0xFFFF;
  TRISB=0;PORTB=0;
  TRISD=0xFF;PORTD=0;

  Lcd_Custom_Config(&PORTB, 7,6,5,4, &PORTB, 0,1,2);
  Lcd_Custom_Cmd(Lcd_Cursor_Off);
  Lcd_Custom_Cmd(Lcd_Clear);
//  TRISF.f2=1;TRISF.f3=0;

 // Uart1_Init(9600);
 Uart1_Init_Advanced(4800,0, 0);


  delay_ms(100);

  Lcd_Custom_Out(1,1,"Transmit Program");

  while(1)
  {
    portb.f8=1;

        //if(portd.f0=1)
//        {uart_str("stop");}
//        delay_ms(500);
   if(Uart1_Data_Ready())
     {
      rx1=Uart1_Read_Char();
      Uart1_Write_Char(rx1);
      bytetostr(rx1,txt);
      Lcd_Custom_Out(2,1,txt);
      }

   }
}